<template>
  <div class="tem_brother">
    <h5>兄弟组件B</h5>
    <button @click="send">将数据发送给兄弟组件C</button>
  </div>
</template>

<script>
import Bus from './bus'
export default {
  name: "brotherB",
  data(){
    return {
      name:'老二',
      age:20
    }
  },
  methods:{
    send(){
      Bus.$emit('msg-b',{
        name:this.name,
        age:this.age
      })
    }
  }
}
</script>

<style scoped>

</style>
